<?xml version='1.0'?>
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
<service_bundle type='manifest' name='mongrel/<%= service_name %>-production'>
  <service name='network/mongrel/<%= service_name %>-production' type='service' version='0'>
    <create_default_instance enabled='true'/>
    <single_instance/>    
    <dependency name='fs' grouping='require_all' restart_on='none' type='service'>
      <service_fmri value='svc:/system/filesystem/local'/>
    </dependency>
    <dependency name='net' grouping='require_all' restart_on='none' type='service'>
      <service_fmri value='svc:/network/loopback'/>
      <!-- Uncomment next line if you need the nfs/client (if the mongrel stuff is on /home which is nfs mounted) -->
      <service_fmri value='svc:/network/nfs/client'/>
    </dependency>
    <dependent name='mongrel_multi-user' restart_on='none' grouping='optional_all'>
      <service_fmri value='svc:/milestone/multi-user'/>
    </dependent>
    <exec_method name='start' type='method' exec='/opt/csw/bin/mongrel_rails cluster::start' timeout_seconds='60'>
      <method_context working_directory='<%= working_directory %>'>
        <method_credential user='root' group='root' />
        <method_environment>
          <envvar name='PATH' value='/usr/bin:/bin:/opt/csw/bin' />
        </method_environment>
      </method_context>
    </exec_method>
    <exec_method name='stop' type='method' exec=':kill' timeout_seconds='60'>
      <method_context/>
    </exec_method>
  </service>
</service_bundle>